﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class BonusReceiveInfoConfig : EntityTypeConfiguration<BonusReceiveInfo>
    {
        public BonusReceiveInfoConfig()
        {
            ToTable("Himall_BonusReceive");
            Property(item => item.OpenId).HasColumnType("varchar").HasMaxLength(100);
            HasRequired(x => x.Himall_Bonus).WithMany(x => x.Himall_BonusReceive).HasForeignKey(x => x.BonusId);
            HasRequired(x => x.Himall_Members).WithMany(x => x.Himall_BonusReceive).HasForeignKey(x => x.UserId);
        }
    }
}
